linalg_errors Module


Uses


Variables

Type Visibility Attributes Name Initial
integer(kind=int32), public, parameter :: LA_ARRAY_SIZE_ERROR = 102

An error flag denoting an improperly sized array.

integer(kind=int32), public, parameter :: LA_CONVERGENCE_ERROR = 106

An error flag denoting a convergence failure.

integer(kind=int32), public, parameter :: LA_INVALID_INPUT_ERROR = 101

An error flag denoting an invalid input.

integer(kind=int32), public, parameter :: LA_INVALID_OPERATION_ERROR = 107

An error resulting from an invalid operation.

integer(kind=int32), public, parameter :: LA_MATRIX_FORMAT_ERROR = 104

An error flag denoting an issue with the matrix format.

integer(kind=int32), public, parameter :: LA_NO_ERROR = 0

An flag denoting no error condition.

integer(kind=int32), public, parameter :: LA_OUT_OF_MEMORY_ERROR = 105

An error flag denoting that there is insufficient memory available.

integer(kind=int32), public, parameter :: LA_SINGULAR_MATRIX_ERROR = 103

An error flag denoting a singular matrix.


Subroutines

public subroutine report_array_size_error(fcn, err, name, expected, actual)

Reports an array size error.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fcn

The name of the function that failed.

class(errors), intent(inout) :: err

The error object to be updated.

character(len=*), intent(in) :: name

The name of the array.

integer(kind=int32), intent(in) :: expected

The expected size of the array.

integer(kind=int32), intent(in) :: actual

The actual size of the array.

public subroutine report_inner_matrix_dimension_error(fcn, err, name1, name2, expected, actual)

Reports an inner matrix dimension error.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fcn

The name of the function that failed.

class(errors), intent(inout) :: err

The error object to be updated.

character(len=*), intent(in) :: name1

The name of the first matrix.

character(len=*), intent(in) :: name2

The name of the second matrix.

integer(kind=int32), intent(in) :: expected

The expected inner dimension.

integer(kind=int32), intent(in) :: actual

The actual inner dimension.

public subroutine report_matrix_size_error(fcn, err, name, expectedRows, expectedCols, actualRows, actualCols)

Reports a matrix size error.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fcn

The name of the function that failed.

class(errors), intent(inout) :: err

The error object to be updated.

character(len=*), intent(in) :: name

The name of the matrix.

integer(kind=int32), intent(in) :: expectedRows

The expected number of rows in the matrix.

integer(kind=int32), intent(in) :: expectedCols

The expected number of columns in the matrix.

integer(kind=int32), intent(in) :: actualRows

The actual number of rows in the matrix.

integer(kind=int32), intent(in) :: actualCols

The actual number of columns in the matrix.

public subroutine report_memory_error(fcn, err, flag)

Reports a memory allocation error.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fcn

The name of the function that failed.

class(errors), intent(inout) :: err

The error object to be updated.

integer(kind=int32), intent(in) :: flag

The error flag.

public subroutine report_singular_matrix_warning(fcn, err, row)

Reports a singular matrix error.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fcn

The name of the function that failed.

class(errors), intent(inout) :: err

The error object to be updated.

integer(kind=int32), intent(in) :: row

The row index where the singularity issue was first encountered.

public subroutine report_square_matrix_error(fcn, err, name, expectedSize, actualRows, actualCols)

Reports an error where a square matrix was expected but a non-square matrix was provided.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fcn

The name of the function that failed.

class(errors), intent(inout) :: err

The error object to be updated.

character(len=*), intent(in) :: name

The name of the matrix.

integer(kind=int32), intent(in) :: expectedSize

The expected size of the square matrix.

integer(kind=int32), intent(in) :: actualRows

The actual number of rows in the matrix.

integer(kind=int32), intent(in) :: actualCols

The actual number of columns in the matrix.